@echo off
cls
cd _master_bats
call config.bat %1 %2
@echo.
@echo.
cd %MASTER_BATS_PATH%
@echo ----------------- CLEANING ---------------------
@echo.
call clean.bat
@echo.
@echo ------------------------------------------------
cd %MASTER_BATS_PATH%
@echo.
@echo -------------- COPYING SOURCES -----------------
@echo.
call copy_src.bat
@echo.
@echo ------------------------------------------------
cd %MASTER_BATS_PATH%
@echo.
@echo --------------- PRECOMPILING -------------------
@echo.
call precompile.bat %1 %2
@echo.
@echo                     DONE!
@echo ------------------------------------------------
cd %MASTER_BATS_PATH%
@echo.
@echo ---------------- COMPILING ---------------------
@echo.
call compile.bat %1
@echo.
@echo                     DONE!
@echo ------------------------------------------------
cd %MASTER_BATS_PATH%
@echo.
@echo ----------------- RELEASE ----------------------
@echo.
call makejar.bat %1 %2
@echo.
@echo                     DONE!
@echo ------------------------------------------------
cd %PRJ_PATH%


if "%1"=="run" (
@echo RUNNING:
call run.bat
)
if "%2"=="run" (
@echo RUNNING:
call run.bat
)
if "%1"=="tag" (
if "%2"=="" (
@echo ::::: BAD TAG NAME, ABORTING :::::
) else (
call tag.bat %2
)
)
if "%2"=="tag" (
if "%3"=="" (
@echo ::::: BAD TAG NAME, ABORTING :::::
) else (
call tag.bat %3
)
)

pause